package com.linys.scala.study.demo

/**
  * Created by admin on 2019/10/11.
  */
class Complex(real: Double, imaginary: Double) {
  def re() = real
  def im() = imaginary
  override def toString() =
    "" + re + (if (im >= 0) "+" else "") + im + "i"
}
